<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>函数对象与实例对象</title>
  </head>
  <body>
    <!-- 
        函数对象：将函数作为对象使用时，简称函数对象
        实例对象：new 构造函数或类产生的对象，我们称之为实例对象
     -->
    <script>
      function Person(name, age) {
        this.name = name
        this.age = age
      }
      Person.a = 1 //将person看成一个对象
      console.log(Person.a)
      Person.name = 'jimm'
      console.log(Person.name) //name不能改

      const p1 = new Person('章三', 18) //p1是Person的实例对象
      console.log(p1)
    </script>
  </body>
</html>
